<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<?php include('include/include_link.php');?>  
</head>
<body>
<?php include('include/variable_session.php');?>     
<?php 
 foreach ($result as $key => $list) {
     $nom = $list['NOM_CLI'];
     $addr_cli = $list['ADDR_CLI'];
     $id_cli = $list['ID_CLI'];
     $id_pays = $list['ID_PAYS'];
     $id_ville = $list['ID_VILLE'];
     $surface = $list['SURFACE'];
     $id_compte = $list['ID_COMPTE_CLI'];

 }
 $pays_cli = $this->mod_clinic->getPaysClinic($id_pays);
 $ville_cli = $this->mod_clinic->getVilleClinic($id_ville);
 $email = $this->mod_clinic->getEmailClinic($id_compte);
 $mdp = $this->mod_clinic->getMdpClinic($id_compte);

?>
<div class="main_container">
	<div id="wraper">  
            <?php include('include/header.php');?>
            <div id="contenu">
            <?php include('js/js_vue_fiche_clinique.php');?>
            <?php
            require_once("js/endroit.php");
            require_once("js/js_vue_updateClinic.php");
            require_once("css/css_vue_updateClinic.php");
            ?>

        <div style="float: right;">
        <?php
                if($id != 0){
                ?>
                <input type="hidden" id="id_clinic_hidden" value="<?php echo $id; ?>" />
                <a class="price-produit" href="<?php echo base_url();?>index.php/clinic/detail?id=<?php echo $id; ?>" target="blank">Visualiser la fiche</a>
                <?php
                }
        ?>
        </div>
            <!-- DEBUT UPDATE CLINIQUE -->
            <div id="tabs">
    <ul>
    <li><a href="#tabs-1">La clinique</a></li>
    <li><a href="#tabs-2">Notre &eacute;quipe</a></li>
    <li><a href="#tabs-3">Prix des soins</a></li>
    <li><a href="#tabs-4">Conditions g&eacute;n&eacute;rales et garanties</a></li>
    <li><a href="#tabs-5">Gal&eacute;ries d'images</a></li>
    <!--<li><a href="#tabs-6">Devis type</a></li>-->
    <li><a href="#tabs-7">Devis reçus</a></li>
    <li><a href="#tabs-8">Messages</a></li>
    <li><a href="#tabs-9">Commentaires</a></li>
    </ul>
    <div id="tabs-1">

    <?php
 		foreach ($result as $key => $list){	
		/*pour extraire les données concernant les cliniques*/
    ?>
<input type="hidden" value="0" id="iCnt" name="iCnt"/>
<table width="44%" border="0" cellspacing="5" cellpadding="0" style="font-size:14px;">  
<tr>
	<td colspan="2">
	<!-- Debut dennées de connexion -->
            <fieldset>
                    <legend><h2>Mes donn&eacute;es de connexion <span title="My tooltip">?</span></h2></legend>
                    <table width="100%">
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>Email *</td>
                                <td>
                                            <span id="spanEmailShow"><?php echo $email;?></span>
                                            <input name="emailhidden" type="hidden"  id="emailhidden" class="mail obligatoire" value="<?php echo $email;?>"/>
                                            <input name="email" type="text"  id="email" class="mail obligatoire" value="<?php echo $email; ?>" />
                                    </td>
                            </tr>

                            <tr>
                                    <td>Mot de passe *</td>
                                <td><span id="spanMdpShow"><?php echo $mdp;?></span>
                                    <input name="mdp" type="password"  id="mdp"  value="<?php echo $mdp;?>" class="obligatoire" readonly/>
                                    <input type="button" value="Changer mot de passe" id="changerMdpClinic" /></td>
                            </tr>
                            <tr>
                                    <td colspan="2">
                                            <div id="ajaxEnregistrerMotdePasseClinic">
                                                    <table>
                                                            <input name="mdp_base" type="hidden"  id="mdp_base" value="<?php echo $mdp;?>"/>
                                                            <tr>
                                                                    <td>
                                                                            Mot de passe actuel: 
                                                                    </td>
                                                                    <td>
                                                                            <input type="password" name="mdp_actuel_Clinic" id="mdp_actuel_Clinic"/>
                                                                    </td>
                                                            </tr>
                                                            <tr>
                                                                    <td>
                                                                            Nouveau mot de passe : 
                                                                    </td>
                                                                    <td>
                                                                            <input type="password" name="mdp_modif_Clinic" id="mdp_modif_Clinic"/>
                                                                    </td>
                                                            </tr>
                                                            <tr>
                                                                    <td>
                                                                    Confirmer mot de passe :
                                                                    </td>
                                                                    <td>
                                                                            <input type="password" name="conf_modif_Clinic" id="conf_modif_Clinic"/>
                                                                    </td>
                                                            </tr>
                                                            <tr><td colspan="2">
                                                                    <input type="button" id="Enregistrer_mdp_modif_Clinic" value="modifier" />
                                                                    <input type="button" id="Annuler_mdp_modif_Clinic" value="annuler" />
                                                                    </td>
                                                            </tr>
                                                    </table>
                                            </div>
                                    </td>
                            </tr>
                            <tr>
                                    <td></td>
                                    <td style="float: right"><input type="button" value="Modifier ces données" id="btnModifMail"/>
                                            <input type="button" value="Enregistrer" id="btnValidMail"/>
                                    </td>
                            </tr>
                    </table>
            </fieldset>
            <!-- Fin données de connexion -->
            </td>
    </tr>
    <!--Debut Localité -->
    <tr>
            <td colspan="2">
            <fieldset>
                    <legend><h2>Localit&eacute;<span title="My tooltip">?</span></h2></legend>
                    <table width="100%">
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                    <td>Pays*
                                    
                                    </td>
                                    <td>				
                                    <input name="id_payshidden" type="hidden"  id="id_payshidden" class="" value="<?php echo $list['ID_PAYS'];?>"/>
                                            <select name="pays" id="pays" value="" class="obligatoire" style="display:none">
                                                    <option value = ""  <?php if($list['ID_PAYS']==""){ echo ' selected="selected"';} ?>>S&eacute;lectionner</option>
                                            <?php 
                                            $pays_= "";
                                            foreach ($pays as $key => $listP){ 
                                                    ?>
                                                    <option value="<?php echo $listP['ID_PAYS']?>" <?php if($listP['ID_PAYS']==$list['ID_PAYS']){ echo ' selected="selected"';$pays_ = $listP['PAYS_FR'];} ?>><?php echo $listP['PAYS_FR']?>
                                                    </option>
                                                    <?php 
                                            }
                                            ?>
                                        </select>
                                            <span id="paysShow"><?php echo $pays_;?></span>
                                            </td>
                            </tr>	
                            <tr>
                                <td>Ville *</td>
                                <td>
                                                            <?php
                                                            $id_pays_bd = $list['ID_PAYS'];
                                                            $ville_ = "";
                                                            if($id_pays_bd!=0){
                                                                    $ville_bd = $this->MDn->getAllVille($id_pays_bd);
                                                                    ?>
                                                                    <input name="id_villehidden" type="hidden"  id="id_villehidden" class="" value="<?php echo $list['ID_VILLE'];?>"/>
                                                                    <select id="ville" name="ville" type="text" size="1" style="width:150px" style="display:none">
                                                                                    <!--<option value="-1">OPTION</option>-->
                                                                                    <option value = ""  <?php if($list['ID_VILLE']==""){ echo ' selected="selected"'; } ?>>S&eacute;lectionner</option>
                                                                                    <?php 
                                                                                    foreach ($ville_bd as $key => $listV){

                                                                                            ?>

                                                                                            <option value="<?php echo $listV['ID_VILLE']?>" <?php if($listV['ID_VILLE']==$list['ID_VILLE']){ echo ' selected="selected"'; $ville_ = $listV['nom_ville'];} ?>><?php echo $listV['nom_ville']?></option>
                                                                                            <?php 
                                                                                    }
                                                                                    ?>
                                                                    </select>
                                                            <?php
                                                            }
                                                            else {
                                                            ?>
                                                            <select id="ville" name="ville" type="text" size="1" style="width:150px" style="display:none">
                                                                            <option value = ""  <?php if($list['ID_VILLE']==""){ echo ' selected="selected"';} ?>>S&eacute;lectionner</option>
                                                                            <?php 
                                                                            foreach ($ville as $key => $listV){
                                                                                    $ville = $listV['nom_ville'];
                                                                                    ?>
                                                                                    <option value="<?php echo $listV['ID_VILLE']?>" <?php if($listV['ID_VILLE']==$list['ID_VILLE']){ echo ' selected="selected"'; $ville_ = $listV['nom_ville'];} ?>><?php echo $list3['nom_ville']?></option>
                                                                                    <?php 
                                                                            }
                                                                            ?>
                                                            </select>
                                                            <?php
                                                            }
                                                            ?>
                                                            <span id="villeShow"><?php echo $ville_;?></span>
                                    <input type="button" value="Ajouter une ville" id="btnAjoutVille" onClick="ajoutville();" />
                            </td>
                              </tr>
                            <tr>
                                    <td colspan="2"><div id="ajaxEnregistrerVille">
                            <input type="text" name="nom_ville_ajout" id="nom_ville_ajout"/>
                            <input type="button" id="enregistrerVille" value="Enregistrer ville" /></div></td>
                            </tr>

                            <tr>
                                <td>Adresse *</td>
                                <td>
                                            <input name="adressehidden" type="hidden"  id="adressehidden" value="<?php echo $list['ADDR_CLI'];?>" class="obligatoire"/>
                                            <input name="adresse" type="text"  id="adresse" value="<?php echo $list['ADDR_CLI'];?>" class="obligatoire"/>
                                            <span id="adresseShow"><?php echo $list['ADDR_CLI'];?></span>
                                    </td>
                              </tr>
                            <tr>
                                <td>Code postal *</td>
                                <td>
                                            <input name="code_postalhidden" type="hidden"  id="code_postalhidden" value="<?php /*echo $list['code_postal'];*/?>" class="obligatoire"/>
                                            <input name="code_postal" type="text"  id="code_postal" value="<?php /*echo $list['code_postal'];*/?>" class="obligatoire"/>					
                                            <span id="code_postalShow"><?php echo $list['code_postal'];?></span>
                                    </td>
                              </tr>
                            <tr>
                                     <td>Google Map</td>
                                <td>
                                            <input name="maphidden" type="hidden"  id="maphidden" value="" class="obligatoire"/>
                                            <input name="map" onfocus="this.value='';this.onfocus=null;" type="text" id="map" style="width: 300px;" class="obligatoire" value="<?php if($list['map'] != ""){ echo $list['map']; } else { echo "Coller le code HTML ici"; };?>" />		
                                            <span id="mapShow"><?php echo $list['map']; ?></span>
                                    </td>
                            </tr>
                            <tr>
                                    <td></td>
                                <td style="float: right">
                                            <input type="button" value="Modifier ces données" id="btnModifLocalite"/>
                                            <input type="button" value="Enregistrer" id="btnValidLocalite"/>
                                    </td>
                            </tr> 
                    </table>
            </fieldset>
            </td>
    </tr>
    <!--Fin Localité -->
    <!--Debut La clinique-->
    <tr>
            <td colspan="2">
            <!-- Debut dennées de connexion -->
            <fieldset>
                    <legend><h2>La clinique <span title="My tooltip">?</span></h2></legend>
                    <table width="100%">
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>Nom de la clinique *</td>
                                <td>
                                    <span id="nom_cliniqueShow"><?php echo $list['nom_clinique'];?></span><input name="nom_cliniquehidden" type="hidden"  id="nom_cliniquehidden" value="<?php echo $list['nom_clinique'];?>" class="obligatoire"/><input name="nom_clinique" type="text"  id="nom_clinique" value="<?php echo $list['nom_clinique'];?>" class="obligatoire"/></td>
                              </tr>
                            <tr>
                                <td>Surface </td>
                                <td><input name="surfacehidden" type="hidden"  id="surfacehidden" value="<?php echo $list['surface'];?>" class=""/>
                                    <select name="surface"id="surface" value="<?php echo $list['surface'];?>" style="display:none">
                                    <option value = ""  <?php if($list['surface']==""){ echo ' selected="selected"';} ?>>S&eacute;lectionner</option>
                                    <option value="30" <?php if($list['surface']=="30"){ echo ' selected="selected"';} ?>>30</option>
                                    <option value="40" <?php if($list['surface']=="40"){ echo ' selected="selected"';} ?>>40</option>
                                    <option value="50" <?php if($list['surface']=="50"){ echo ' selected="selected"';} ?>>50</option>
                                    <option value="60" <?php if($list['surface']=="60"){ echo ' selected="selected"';} ?>>60</option>
                                    <option value="70" <?php if($list['surface']=="70"){ echo ' selected="selected"';} ?>>70</option>
                                    <option value="80" <?php if($list['surface']=="80"){ echo ' selected="selected"';} ?>>80</option>
                                    <option value="90" <?php if($list['surface']=="90"){ echo ' selected="selected"';} ?>>90</option>
                                    <option value="100" <?php if($list['surface']=="100"){ echo ' selected="selected"';} ?>>100</option>
                                    <option value="110" <?php if($list['surface']=="110"){ echo ' selected="selected"';} ?>>110</option>
                                    <option value="120" <?php if($list['surface']=="120"){ echo ' selected="selected"';} ?>>120</option>
                                    <option value="130" <?php if($list['surface']=="130"){ echo ' selected="selected"';} ?>>130</option>
                                    <option value="140" <?php if($list['surface']=="140"){ echo ' selected="selected"';} ?>>140</option>
                                    <option value="150" <?php if($list['surface']=="150"){ echo ' selected="selected"';} ?>>150</option>
                                    <option value="160" <?php if($list['surface']=="160"){ echo ' selected="selected"';} ?>>160</option>
                                    <option value="170" <?php if($list['surface']=="170"){ echo ' selected="selected"';} ?>>170</option>
                                    <option value="180" <?php if($list['surface']=="180"){ echo ' selected="selected"';} ?>>180</option>
                                    <option value="190" <?php if($list['surface']=="190"){ echo ' selected="selected"';} ?>>190</option>
                                    <option value="200" <?php if($list['surface']=="200"){ echo ' selected="selected"';} ?>>200</option>
                                    <option value="210" <?php if($list['surface']=="210"){ echo ' selected="selected"';} ?>>210</option>
                                    <option value="220" <?php if($list['surface']=="220"){ echo ' selected="selected"';} ?>>220</option>
                                    <option value="230" <?php if($list['surface']=="230"){ echo ' selected="selected"';} ?>>230</option>
                                    <option value="240" <?php if($list['surface']=="240"){ echo ' selected="selected"';} ?>>240</option>
                                    <option value="250" <?php if($list['surface']=="250"){ echo ' selected="selected"';} ?>>250</option>
                                    <option value="260" <?php if($list['surface']=="260"){ echo ' selected="selected"';} ?>>260</option>
                                    <option value="270" <?php if($list['surface']=="270"){ echo ' selected="selected"';} ?>>270</option>
                                    <option value="280" <?php if($list['surface']=="280"){ echo ' selected="selected"';} ?>>280</option>
                                    <option value="290" <?php if($list['surface']=="290"){ echo ' selected="selected"';} ?>>290</option>
                                    <option value="300" <?php if($list['surface']=="300"){ echo ' selected="selected"';} ?>>300</option>
                                    <option value="310" <?php if($list['surface']=="310"){ echo ' selected="selected"';} ?>>310</option>
                                    <option value="320" <?php if($list['surface']=="320"){ echo ' selected="selected"';} ?>>320</option>
                                    <option value="330" <?php if($list['surface']=="330"){ echo ' selected="selected"';} ?>>330</option>
                                    <option value="340" <?php if($list['surface']=="340"){ echo ' selected="selected"';} ?>>340</option>
                                    <option value="350" <?php if($list['surface']=="350"){ echo ' selected="selected"';} ?>>350</option>
                                    <option value="360" <?php if($list['surface']=="360"){ echo ' selected="selected"';} ?>>360</option>
                                    <option value="370" <?php if($list['surface']=="370"){ echo ' selected="selected"';} ?>>370</option>
                                    <option value="380" <?php if($list['surface']=="380"){ echo ' selected="selected"';} ?>>380</option>
                                    <option value="390" <?php if($list['surface']=="390"){ echo ' selected="selected"';} ?>>390</option>
                                    <option value="400" <?php if($list['surface']=="400"){ echo ' selected="selected"';} ?>>400</option>
                                    <option value="410" <?php if($list['surface']=="410"){ echo ' selected="selected"';} ?>>410</option>
                                    <option value="420" <?php if($list['surface']=="420"){ echo ' selected="selected"';} ?>>420</option>
                                    <option value="430" <?php if($list['surface']=="430"){ echo ' selected="selected"';} ?>>430</option>
                                    <option value="440" <?php if($list['surface']=="440"){ echo ' selected="selected"';} ?>>440</option>
                                    <option value="450" <?php if($list['surface']=="450"){ echo ' selected="selected"';} ?>>450</option>
                                    <option value="460" <?php if($list['surface']=="460"){ echo ' selected="selected"';} ?>>460</option>
                                    <option value="470" <?php if($list['surface']=="470"){ echo ' selected="selected"';} ?>>470</option>
                                    <option value="480" <?php if($list['surface']=="480"){ echo ' selected="selected"';} ?>>480</option>
                                    <option value="490" <?php if($list['surface']=="490"){ echo ' selected="selected"';} ?>>490</option>
                                    <option value="500" <?php if($list['surface']=="500"){ echo ' selected="selected"';} ?>>500</option>
                                </select>
                                    <span id="surfaceShow"><?php echo $list['surface'];?></span>
                                    m²</td>
                            </tr>
                            <tr>
                                <td>Nombre de fauteuils</td>
                                <td><input name="fauteuilhidden" type="hidden"  id="fauteuilhidden" value="<?php echo $list['fauteuil'];?>" class=""/>
                                    <select name="fauteuil"id="fauteuil" style="display:none">
                                            <option value = ""  <?php if($nb_fauteuil==""){ echo ' selected="selected"';} ?>>S&eacute;lectionner</option>
                                        <?php
                                          for ($i = 1; $i <= 10; $i++)
                                          {
                                                      $var = "";
                                                      $nb_fauteuil = $list['fauteuil'];
                                                      if ($i == $nb_fauteuil){
                                                              $var ="selected=selected";
                                                      }
                                            echo '<option value="' . $i . '" '.$var.'>' . $i . '</option>';
                                          }
                                        ?>
                                    </select>
                                    <span id="fauteuilShow"><?php echo $list['fauteuil'];?></span>
                            </td>
                            </tr>
                            <tr>
                                <td>Scanner *</td>
                                <td>
                                            <input name="scannerhidden" type="hidden"  id="scannerhidden" value="<?php echo $list['scanner'];?>" class=""/>
                                            <span id="bloc_scanner" style="display:none" >
                                            <input type="radio" name="scanner" id="scannerOui" value="Oui" <?php if($list['scanner']=='Oui'){ echo ' checked="checked"';} ?> />Oui
                                            <input type="radio" name="scanner" value="Non" id="scannerNon" <?php if($list['scanner']=='Non'){ echo ' checked="checked"';} ?> />Non
                                            </span>
                                            <span id="result_scanner"><?php echo $list['scanner'];?></span>
                                    </td>
                            </tr>
                            <tr>
                                <td>Laboratoire proth&egrave;se dentaire sur place *</td>
                                <td>
                                            <input name="prothesehidden" type="hidden"  id="prothesehidden" value="<?php echo $list['prothese'];?>" class=""/>
                                            <span id="bloc_prothese" style="display:none" >
                                            <input type="radio" name="prothese" id="protheseOui" value="Oui" <?php if($list['prothese']=='Oui'){ echo ' checked="checked"';} ?> />Oui
                                            <input type="radio" name="prothese" id="protheseNon" value="Non" <?php if($list['prothese']=='Non'){ echo ' checked="checked"';} ?> >Non
                                            </span>
                                            <span id="result_prothese"><?php echo $list['prothese'];?></span>
                                    </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <span>Pr&eacute;sentation de la clinique</span>
                                    <div id="presentation">
                                        <fieldset>
                                            <legend>Pr&eacute;sentation en Fra&ccedil;ais</legend>
                                            <div id="presentation_fr"><?php echo $list['presentationFr']; ?></div>
                                        </fieldset>
                                        <fieldset>
                                            <legend>Pr&eacute;sentation en Anglais</legend>
                                            <div id="presentation_en"><?php echo $list['presentationEn']; ?></div>
                                        </fieldset>
                                        <fieldset>
                                            <legend>Pr&eacute;sentation en Allemand</legend>
                                            <div id="presentation_de"><?php echo $list['presentationDe']; ?></div>
                                        </fieldset>
                                    </div>
                                </td>

                            </tr>
                            <tr>
                                    <td></td>
                                <td style="float: right">
                                            <input type="button" value="Modifier ces données" id="btnModifClinique"/>
                                            <input type="button" value="Enregistrer" id="btnValidClinique"/>
                                    </td>
                            </tr> 
                    </table>
            </fieldset>
            </td>
    </tr>
    <!--Fin la clinique-->
    <!--Debut Materiels et Matériaux-->
    <tr>
            <td colspan="2">
            <!-- Debut dennées de connexion -->
            <fieldset>
                    <legend><h2>Mat&eacute;riels et mat&eacute;riaux<span title="My tooltip">?</span></h2></legend>
                    <table width="100%">
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                    <td></td>
                                    <td>
                                            <div id="listMarqueImplant"></div>
                                    </td>
                            </tr>
                            <tr>
                                    <td>Marque des implants dentaires  </td>
                                    <td>
                                            <table>
                                                    <tr>
                                                            <td>
                                                                    <table>
                                                                            <tr>
                                                                                    <td>
                                                                                            <table id="blocradio_implant1" style="display:none" >
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butmarque_implant1" id="butmarque_implant1_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                            </td>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butmarque_implant1" value="Non" id="butmarque_implant_non" />Supprimer
                                                                                                            </td>
                                                                                                    </tr>
                                                                                            </table>
                                                                                    </td>
                                                                                    <td>
                                                                                            <span id="marque_implant1Show"><?php echo $list['marque_implant1'];?></span>
                                                                                            <input style="display: none;" type="text" name="marque_implant1" id="marque_implant1" value="<?php echo $list['marque_implant1'];?>">
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                                            </td>
                                                            <td>
                                                                    <input style="display:none;" type="button" value="Ajouter une autre marque" id="ajouteMarque" />
                                                            </td>
                                                    </tr>
                                                    <?php
                                                            $ii = 1;
                                                            if($list['marque_implant2'] != ""){
                                                                    $ii =2;
                                                            ?>
                                                                    <tr>
                                                                            <td>
                                                                                    <table>
                                                                                            <tr>
                                                                                                    <td>
                                                                                                            <table id="blocradio_implant2" style="display:none" >
                                                                                                                    <tr>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant2" id="butmarque_implant2_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                                            </td>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant2" value="Non" id="butmarque_implant2_non" />Supprimer
                                                                                                                            </td>
                                                                                                                    </tr>
                                                                                                            </table>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                            <span id="marque_implant2Show"><?php echo $list['marque_implant2'];?></span>
                                                                                                            <input style="display: none;" type="text" name="marque_implant2" id="marque_implant2" value="<?php echo $list['marque_implant2'];?>" />
                                                                                                    </td>
                                                                                            </tr>
                                                                                    </table>
                                                                            </td>
                                                                            <td>
                                                                            </td>
                                                                    </tr>		
                                                            <?php	
                                                            }
                                                    ?>
                                                    <?php
                                                            if($list['marque_implant3'] != ""){
                                                                    $ii =3;
                                                            ?>
                                                                    <tr>	
                                                                            <td>
                                                                                    <table>
                                                                                            <tr>
                                                                                                    <td>
                                                                                                            <table id="blocradio_implant3" style="display:none" >
                                                                                                                    <tr>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant3" id="butmarque_implant3_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                                            </td>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant3" value="Non" id="butmarque_implant3_non" />Supprimer
                                                                                                                            </td>
                                                                                                                    </tr>
                                                                                                            </table>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                            <span id="marque_implant3Show"><?php echo $list['marque_implant3'];?></span>
                                                                                                            <input style="display: none;" type="text" name="marque_implant3" id="marque_implant3" value="<?php echo $list['marque_implant3'];?>" />
                                                                                                    </td>
                                                                                            </tr>
                                                                                    </table>

                                                                            </td>
                                                                            <td></td>
                                                                    </tr>		
                                                            <?php	
                                                            }
                                                    ?>
                                                    <tr>
                                                            <td>
                                                                    <table id="marque2" style="display: none;">
                                                                                            <tr>
                                                                                                    <td>
                                                                                                            <table id="blocradio_implant2">
                                                                                                                    <tr>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant2" id="butmarque_implant2_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                                            </td>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant2" value="Non" id="butmarque_implant2_non" />Supprimer
                                                                                                                            </td>
                                                                                                                    </tr>
                                                                                                            </table>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                            <input  type="text" name="marque_implant2" id="marque_implant2" value="" />
                                                                                                            <span id="marque_implant2Show"></span>
                                                                                                    </td>
                                                                                            </tr>
                                                                    </table>
                                                                    <table id="marque3" style="display: none;">
                                                                                            <tr>
                                                                                                    <td>
                                                                                                            <table id="blocradio_implant3">
                                                                                                                    <tr>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant3" id="butmarque_implant3_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                                            </td>
                                                                                                                            <td>
                                                                                                                                    <input type="radio" name="butmarque_implant3" value="Non" id="butmarque_implant3_non" />Supprimer
                                                                                                                            </td>
                                                                                                                    </tr>
                                                                                                            </table>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                            <input  type="text" name="marque_implant3" id="marque_implant3" value="" />
                                                                                                            <span id="marque_implant3Show"></span>
                                                                                                    </td>
                                                                                            </tr>
                                                                    </table>
                                                                    <!--<input style="display: none;" type="text" name="marque1" id="marque1" onfocus="this.value='';this.onfocus=null;" value="marque 1"><br />
                                                                    <input style="display: none;" type="text" name="marque2" id="marque2" onfocus="this.value='';this.onfocus=null;" value="marque 2"><br />
                                                                    <input style="display: none;" type="text" name="marque3" id="marque3" onfocus="this.value='';this.onfocus=null;" value="marque 3">
                                                                    -->
                                                            </td>
                                                    </tr>
                                            </table>
                                    </td>
                              </tr>
                            <tr>
                                    <td>Origine des principaux mat&eacute;riaux utilis&eacute;s en bouche *</td>
                                    <td>
                                            <table>
                                                    <tr>
                                                            <td>
                                                                    <table>
                                                                            <tr>
                                                                                    <td>
                                                                                            <table id="blocradio_materiaux1" style="display:none">
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux1" id="butorigine_materiaux1_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                            </td>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux1" value="Non" id="butorigine_materiaux1_non" />Supprimer
                                                                                                            </td>
                                                                                                    </tr>
                                                                                            </table>
                                                                                    </td>
                                                                                    <td>
                                                                                            <select name="origine_materiaux1" id="origine_materiaux1" value="" class="obligatoire" disabled="disabled">
                                                                                                    <option value="0">Selectionner</option>
                                                                                                <?php 
                                                                                                    $pays_ori1 = "";

                                                                                                    foreach ($origine_materiaux1 as $key => $list1){
                                                                                                            ?>
                                                                                                            <option value="<?php echo $list1['id_pays']?>" <?php if($list1['id_pays']==$list['origine_materiaux1']){ echo ' selected="selected"'; $pays_ori1 =$list1['nom_pays']; } ?>><?php echo $list1['nom_pays']?>
                                                                                                            </option>
                                                                                                            <?php 
                                                                                                    }
                                                                                                    ?>
                                                                                            </select>
                                                                                            <span id="origine_materiaux1Show"><?php echo $pays_ori1;?></span>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>

                                                            </td>
                                                            <td>
                                                                    <input style="display: none;" type="button" value="Ajouter une autre origine" id="ajouteOrigine" />
                                                            </td>
                                                    </tr>
                                            </table>
                                    </td>
                                </tr>	
                            <?php
                                    $ij = 1;
                                    $pays_ori2 = "";
                                    if($list['origine_materiaux2'] != 0 ){
                                            $ij = 2;
                            ?>    
                            <tr>
                                    <td></td>
                                    <td>
                                                                    <table>
                                                                            <tr>
                                                                                    <td>
                                                                                            <table id="blocradio_materiaux2" style="display:none">
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux2" id="butorigine_materiaux2_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                            </td>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux2" value="Non" id="butorigine_materiaux2_non" />Supprimer
                                                                                                            </td>
                                                                                                    </tr>
                                                                                            </table>
                                                                                    </td>
                                                                                    <td>
                                                                                            <select name="origine_materiaux2" id="origine_materiaux2" value="" class="obligatoire" disabled="disabled">
                                                                                                    <option value="0">Selectionner</option>
                                                                                            <?php 
                                                                                            foreach ($origine_materiaux2 as $key => $list2){
                                                                                                    ?>
                                                                                                    <option value="<?php echo $list2['id_pays']?>" <?php if($list2['id_pays']==$list['origine_materiaux2']){ echo ' selected="selected"'; $pays_ori2 =$list2['nom_pays'];} ?>><?php echo $list2['nom_pays']?>
                                                                                                    </option>
                                                                                                    <?php 
                                                                                            }
                                                                                            ?>
                                                                                        </select>
                                                                                            <span id="origine_materiaux2Show"><?php echo $pays_ori2;?></span>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                            </td>
                                    </tr>
                            <?php				
                                    }
                                    else {
                                    ?>
                                    <tr>
                                    <td></td>
                                    <td>
                                                    <table id="origine_materiaux2__" style="display:none">
                                                                            <tr>
                                                                                    <td>
                                                                                            <table id="blocradio_materiaux2">
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux2" id="butorigine_materiaux2_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                            </td>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux2" value="Non" id="butorigine_materiaux2_non" />Supprimer
                                                                                                            </td>
                                                                                                    </tr>
                                                                                            </table>
                                                                                    </td>

                                                                                    <td>
                                                                                            <select name="origine_materiaux2" id="origine_materiaux2" value="" class="obligatoire" disabled="disabled">
                                                                                                    <option value="0">Selectionner</option>
                                                                                            <?php 
                                                                                            foreach ($origine_materiaux2 as $key => $list2){
                                                                                                    ?>
                                                                                                    <option value="<?php echo $list2['id_pays']?>" <?php if($list2['id_pays']==$list['origine_materiaux2']){ echo ' selected="selected"'; $pays_ori2 =$list2['nom_pays'];} ?>><?php echo $list2['nom_pays']?>
                                                                                                    </option>
                                                                                                    <?php 
                                                                                            }
                                                                                            ?>
                                                                                        </select>
                                                                                            <span id="origine_materiaux2Show"><?php echo $pays_ori2;?></span>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                    </td>
                                    </tr>
                                    <?php
                                    }
                                    $pays_ori3 = "";
                                    if($list['origine_materiaux3'] != 0 ){
                                            $ij =3;

                            ?>
                                <tr>
                                            <td></td>
                                            <td>
                                                    <table>
                                                                            <tr>
                                                                                    <td>
                                                                                            <table id="blocradio_materiaux3" style="display:none">
                                                                                                    <tr>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux3" id="butorigine_materiaux3_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                            </td>
                                                                                                            <td>
                                                                                                                    <input type="radio" name="butorigine_materiaux3" value="Non" id="butorigine_materiaux3_non" />Supprimer
                                                                                                            </td>
                                                                                                    </tr>
                                                                                            </table>
                                                                                    </td>
                                                                                    <td>
                                                                                            <select name="origine_materiaux3" id="origine_materiaux3" value="<?php echo $list['origine_materiaux3'];?>" class="" disabled="disabled">
                                                                                                    <option value="0">Selectionner</option>
                                                                                                    <?php 
                                                                                                    foreach ($origine_materiaux3 as $key => $list3){
                                                                                                            ?>
                                                                                                            <option value="<?php echo $list3['id_pays']?>" <?php if($list3['id_pays']==$list['origine_materiaux3']){ echo ' selected="selected"'; $pays_ori3 =$list3['nom_pays'];} ?>><?php echo $list3['nom_pays']?>
                                                                                                            </option>
                                                                                                            <?php 
                                                                                                    }
                                                                                                    ?>
                                                                                                </select>
                                                                                                    <span id="origine_materiaux3Show"><?php echo $pays_ori3;?></span>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                            </td>
                                    </tr>
                            <?php
                            }
                            else {
                                    ?>
                                    <tr>
                                            <td></td>
                                            <td>
                                                            <table id="origine_materiaux3__" style="display:none">
                                                                            <tr>
                                                                                    <td>
                                                                                            <table id="blocradio_materiaux3" style="display:none">
                                                                                                    <td>										
                                                                                                            <input type="radio" name="butorigine_materiaux3" id="butorigine_materiaux3_oui" value="Oui" checked="checked" style="display:none"/>
                                                                                                    </td>
                                                                                                    <td>
                                                                                                            <input type="radio" name="butorigine_materiaux3" value="Non" id="butorigine_materiaux3_non" />Supprimer
                                                                                                    </td>
                                                                                            </table>
                                                                                    </td>
                                                                                    <td>
                                                                                            <select name="origine_materiaux3" id="origine_materiaux3" value="<?php echo $list['origine_materiaux3'];?>" class="" disabled="disabled">
                                                                                                    <option value="0">Selectionner</option>
                                                                                                    <?php 
                                                                                                    foreach ($origine_materiaux3 as $key => $list3){
                                                                                                            ?>
                                                                                                            <option value="<?php echo $list3['id_pays']?>" <?php if($list3['id_pays']==$list['origine_materiaux3']){ echo ' selected="selected"'; $pays_ori3 =$list3['nom_pays'];} ?>><?php echo $list3['nom_pays']?>
                                                                                                            </option>
                                                                                                            <?php 
                                                                                                    }
                                                                                                    ?>
                                                                                                </select>
                                                                                                    <span id="origine_materiaux3Show"><?php echo $pays_ori3;?></span>
                                                                                    </td>
                                                                            </tr>
                                                                    </table>
                                            </td>
                                    </tr>
                                    <?php
                            }
                            ?>
                                    <tr>
                                            <td>
                                                    <input type="hidden" value="<?php echo $ij; ?>" id="nbre_origine">
                                                    <input type="hidden" value="<?php echo $ii; ?>" id="nbre_marque">
                                                    <input id="marque_implant1hidden" class="obligatoire" type="hidden" value="<?php echo $list['marque_implant1'];?>" name="marque_implant1hidden">
                                                    <input id="marque_implant2hidden" class="obligatoire" type="hidden" value="<?php echo $list['marque_implant2'];?>" name="marque_implant2hidden">
                                                    <input id="marque_implant3hidden" class="obligatoire" type="hidden" value="<?php echo $list['marque_implant3'];?>" name="marque_implant3hidden">
                                                    <input name="origine_materiaux1hidden" type="hidden"  id="origine_materiaux1hidden" value="<?php echo $list['origine_materiaux1'];?>" class=""/>
                                                    <input name="origine_materiaux2hidden" type="hidden"  id="origine_materiaux2hidden" value="<?php echo $list['origine_materiaux2'];?>" class=""/>
                                                    <input name="origine_materiaux3hidden" type="hidden"  id="origine_materiaux3hidden" value="<?php echo $list['origine_materiaux3'];?>" class=""/>
                                            </td>
                                        <td style="float: right">
                                                    <input type="button" id="btnModifMateriel" value="Modifier ces données">
                                                    <input type="button" id="btnValidMateriel" value="Enregistrer" style="display: none;">
                                            </td>
                                    </tr>

                    </table>
            </fieldset>
            </td>
    </tr>
    <!--Fin Materiels et Matériaux-->
    <!--Debut Site web-->
    <tr>
            <td colspan="2">
            <fieldset>
                    <legend><h2>Site web <span title="My tooltip">?</span></h2></legend>
                    <table width="100%">
                            <tr>
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td>Site web de la clinique *</td>
                                <td>
                                    <span id="sitewebShow"><?php echo $list['siteweb'];?></span><input name="sitewebhidden" type="hidden"  id="sitewebhidden" value="<?php echo $list['siteweb'];?>" class="obligatoire"/><input name="siteweb" type="text"  id="siteweb" value="<?php echo $list['siteweb'];?>" class="obligatoire"/></td>
                            </tr>
                            <tr>
                                <td>Lien retour *</td>
                                <td>
                                    <span id="lienretourShow"><?php echo $list['lienretour'];?></span><input name="lienretourhidden" type="hidden"  id="lienretourhidden" value="<?php echo $list['lienretour'];?>" class="obligatoire"/><input name="lienretour" type="text"  id="lienretour" value="<?php echo $list['lienretour']; ?>" style="width:350px" class="obligatoire" /></td>
                            </tr>
                            <tr>
                                    <td></td>
                                <td style="float: right">
                                            <input type="button" value="Modifier ces données" id="btnModifSiteweb"/>
                                            <input type="button" value="Enregistrer" id="btnValidSiteweb"/>
                                    </td>
                            </tr> 
                    </table>
            </fieldset>
            </td>
    </tr>
    <!--Fin site web-->  
    </table>    
    <?php
    }		
    ?>
    </div>
    <!-- Debut equipe -->
    <div id="tabs-2">
    <iframe class="scroll-box" src="<?php echo base_url();?>index.php/clinic/ajoutDentiste?id=<?php echo $id; ?>" frameborder=0></iframe>
    <!-- Fin equipe -->
    </div>
    <div id="tabs-3">
    <iframe class="scroll-box" src="<?php echo base_url();?>index.php/clinic/prixSoins?id=<?php echo $id; ?>" frameborder=0></iframe>
    </div>
    <div id="tabs-4">
    <iframe class="scroll-box" src="<?php echo base_url();?>index.php/clinic/ajoutConditionEtGarantie?id=<?php echo $id; ?>" frameborder=0></iframe>
    </div>
    <div id="tabs-5">
    <iframe class="scroll-box" src="<?php echo base_url();?>index.php/clinic/ajoutGalerieImage?id=<?php echo $id; ?>" frameborder=0></iframe>
    </div>
    <!--<div id="tabs-6">
    Devis type
    </div>-->
    <div id="tabs-7">
    <iframe class="scroll-box" src="<?php echo base_url();?>index.php/clinic/devisRecus?id=<?php echo $id; ?>" frameborder=0></iframe>
    </div>
    <div id="tabs-8">
    <iframe class="scroll-box" src="<?php echo base_url();?>index.php/clinic/msgRecus?id=<?php echo $id; ?>" frameborder=0></iframe>
    </div>
    <div id="tabs-9">
    <iframe class="scroll-box" src="<?php echo base_url();?>index.php/clinic/commentaireRecus?id=<?php echo $id; ?>" frameborder=0></iframe>
    </div>
    </div>
            
            <!-- DEBUT UPDATE CLINIQUE -->
            <div id="popup"></div>
<div id="popup2"></div>
            
        </div>
        </div>
    
</div>
        

        
    <?php include('include/footer.php'); ?>
</body>
</html>
